<!--
  Authors: M.Ravi (st111222)
           Orathai Dumrongsukniwat (st111002)
  Date: 17 September, 2010
-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<title>Find Quotations</title>
</head>
<body>
<center>
<% form_tag({:controller => "basics", :action => 'quotationSearchResults'}, :method => "post") do %>
	<%= label_tag(:q, "Keywords: ") %>
	<%= text_field_tag :q, nil, :size => 50 %>
	<%= submit_tag("Search") %>
<% end %>
<br/>
<div>
	<table>
	<tr><td colspan="3"><h3>Search Results For : <%= @fw %></h3></td></tr>
	<tr><td colspan="3">
	<ul>
	<%
	if @quotation_exists	
	   	for quotation in @quotations %>
			<li><%= h quotation.author_name %>: <%= h quotation.quote %></li>
		<% end %>
	<%
	else  
	%>
	<li>No quotations found</li>	
	<%
	end
	%>
	</ul>
	</td></tr>
	</table>
</div>
<!-- FOOTER -->
<%= render :file => 'layouts/footer' %>
<!-- FOOTER END -->
</center>
</body>
</html>
